package D525;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public class Sqlconnection {
    private static final String URL = "jdbc:mysql://localhost:3306/userDb";
    private static final String USERNAME = "root";
    private static final String PASSWORD = "123456";
    public static Connection getCon() throws ClassNotFoundException, SQLException {
        Class.forName("com.mysql.cj.jdbc.Driver");
        return DriverManager.getConnection(URl,USERNAME,PASSWORD);
    }
}
